package statePattern.spring;

import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author : 叶荻风
 * @create : 2024/6/27 17:41
 *
 */
@Component
public class ReviewTreatment implements IState{
    @Resource
    ReviewSuccess reviewSuccess;
    @Override
    public void doHandler(Response response) {
        if(response.getSignal()==1){
            System.out.println("treat:"+response);
        }else{
            response.setState(reviewSuccess);
            response.doHandle();
        }
    }
}
